import { DEFAULT_LAYOUT } from '../base'
import { AppRouteRecordRaw } from '../types'

const Market: AppRouteRecordRaw = {
  path: '/market',
  name: 'market',
  component: DEFAULT_LAYOUT,
  meta: {
    locale: '营销',
    requiresAuth: true,
    icon: 'icon-computer',
    order: 4,
  },
  children: [
    {
      path: '/market/coupon', // The midline path complies with SEO specifications
      name: 'marketCoupon',
      component: () => import('@/views/market/coupon.vue'),
      meta: {
        locale: '优惠券列表',
        requiresAuth: true,
        roles: ['*'],
      },
    },
    {
      path: '/market/activity', // The midline path complies with SEO specifications
      name: 'marketactivity',
      component: () => import('@/views/market/activity.vue'),
      meta: {
        locale: '营销活动',
        requiresAuth: true,
        roles: ['*'],
      },
    },
    {
      path: '/market/activityGoods', // The midline path complies with SEO specifications
      name: 'marketActivityGoods',
      component: () => import('@/views/market/activityGoods.vue'),
      meta: {
        locale: '管理活动商品',
        requiresAuth: true,
        hideInMenu: true,
        roles: ['*'],
      },
    },
    {
      path: '/market/birthdayCoupon', // The midline path complies with SEO specifications
      name: 'marketbirthdayCoupon',
      component: () => import('@/views/market/birthdayCoupon.vue'),
      meta: {
        locale: '生日有礼',
        requiresAuth: true,
        roles: ['*'],
      },
    },

    {
      path: '/market/newCoupon', // The midline path complies with SEO specifications
      name: 'marketnewCoupon',
      component: () => import('@/views/market/newCoupon.vue'),
      meta: {
        locale: '新人有礼',
        requiresAuth: true,
        roles: ['*'],
      },
    },
    {
      path: '/market/signConfig', // The midline path complies with SEO specifications
      name: 'marketsignConfig',
      component: () => import('@/views/market/signConfig.vue'),
      meta: {
        locale: '签到有礼',
        requiresAuth: true,
        roles: ['*'],
      },
    },
  ],
}

export default Market
